<template>
  <ConfigProvider :locale="getAntdLocale">
    <AppProvider>
      <a-spin :spinning="spinning" tip="重启中..." wrapperClassName="resetspin">
        <RouterView />
      </a-spin>
    </AppProvider>
  </ConfigProvider>
</template>

<script lang="ts">
  import { defineComponent, ref } from 'vue';
  import { ConfigProvider } from 'ant-design-vue';
  import { AppProvider } from '/@/components/Application';
  import { useTitle } from '/@/hooks/web/useTitle';
  import { useLocale } from '/@/locales/useLocale';
  import Bus from '/@/utils/helper/eventbus';
  export default defineComponent({
    components: { ConfigProvider, AppProvider },
    setup() {
      const { getAntdLocale } = useLocale();
      const spinning = ref(false);
      useTitle();

      Bus.$on('showspin', (e) => {
        spinning.value = e;
      });

      return {
        getAntdLocale,
        spinning,
      };
    },
  });
</script>

<style>
  .resetspin,
  .resetspin .ant-spin-container {
    height: 100%;
  }
  .ant-modal-header {
    background-color: #002140 !important;
  }
  .ant-modal-close,
  .ant-modal-title,
  .vben-basic-title {
    color: #fff !important;
  }
</style>
